package com.kpmg.datalake.schedule.model;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 任务调度
 * </p>
 *
 * @author azhao6
 * @since 2018-08-09
 */
@TableName("SKD_JOB")
public class ScheduleJob implements Serializable {

    private static final long serialVersionUID = 1979989567012376691L;
    /**
     * 任务ID
     */
    @TableId(type = IdType.UUID)
    private String jobId;
    /**
     * 任务名称
     */
    private String jobName;
    /**
     * 任务分组
     */
    private String jobGroup;
    /**
     * 任务描述
     */
    private String jobDesc;
    /**
     * 任务执行周期（cron表达式）
     */
    private String jobCron;
    /**
     * job参数
     */
    private String jobParam;
    /**
     * 任务状态
     */
    private String jobStatus;
    /**
     * 是否并发
     */
    private String jobConcurrent;
    /**
     * 任务类型（本地任务还是远程任务）
     */
    private String jobType;
    /**
     * 执行动作
     */
    private String jobAction;
    /**
     * 最近执行时间
     */
    private Date latelyTime;
    /**
     * 是否有效
     */
    private Integer delInd;
    /**
     * 创建人
     */
    private String crtUsrId;
    /**
     * 创建时间
     */
    private Date crtDt;
    /**
     * 更新人
     */
    private String udtUsrId;
    /**
     * 更新时间
     */
    private Date udtDt;
    /**
     * 下次计划执行时间
     */
    @TableField(exist = false)
    private Date nextTime;


    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobGroup() {
        return jobGroup;
    }

    public void setJobGroup(String jobGroup) {
        this.jobGroup = jobGroup;
    }

    public String getJobDesc() {
        return jobDesc;
    }

    public void setJobDesc(String jobDesc) {
        this.jobDesc = jobDesc;
    }

    public String getJobCron() {
        return jobCron;
    }

    public void setJobCron(String jobCron) {
        this.jobCron = jobCron;
    }

    public String getJobParam() {
        return jobParam;
    }

    public void setJobParam(String jobParam) {
        this.jobParam = jobParam;
    }

    public String getJobStatus() {
        return jobStatus;
    }

    public void setJobStatus(String jobStatus) {
        this.jobStatus = jobStatus;
    }

    public String getJobConcurrent() {
        return jobConcurrent;
    }

    public void setJobConcurrent(String jobConcurrent) {
        this.jobConcurrent = jobConcurrent;
    }

    public String getJobType() {
        return jobType;
    }

    public void setJobType(String jobType) {
        this.jobType = jobType;
    }

    public String getJobAction() {
        return jobAction;
    }

    public void setJobAction(String jobAction) {
        this.jobAction = jobAction;
    }

    public Date getLatelyTime() {
        return latelyTime;
    }

    public void setLatelyTime(Date latelyTime) {
        this.latelyTime = latelyTime;
    }

    public Integer getDelInd() {
        return delInd;
    }

    public void setDelInd(Integer delInd) {
        this.delInd = delInd;
    }

    public String getCrtUsrId() {
        return crtUsrId;
    }

    public void setCrtUsrId(String crtUsrId) {
        this.crtUsrId = crtUsrId;
    }

    public Date getCrtDt() {
        return crtDt;
    }

    public void setCrtDt(Date crtDt) {
        this.crtDt = crtDt;
    }

    public String getUdtUsrId() {
        return udtUsrId;
    }

    public void setUdtUsrId(String udtUsrId) {
        this.udtUsrId = udtUsrId;
    }

    public Date getUdtDt() {
        return udtDt;
    }

    public void setUdtDt(Date udtDt) {
        this.udtDt = udtDt;
    }

    public Date getNextTime() {
        return nextTime;
    }

    public void setNextTime(Date nextTime) {
        this.nextTime = nextTime;
    }

    @Override
    public String toString() {
        return getClass().getName() + JSONObject.toJSONString(this);
    }
}
